#pragma once
#include <memory>
#include <vector>
#include "event_loop_thread.h"

class EventLoopThreadPool
{
public:
  EventLoopThreadPool(EventLoop *baseLoop, int numThreads);

  ~EventLoopThreadPool() {}
  void start();

  EventLoop *getNextLoop();

private:
  EventLoop* baseLoop_;

  bool started_;
  int numThreads_;
  int next_loop_idx_;

  std::vector<std::shared_ptr<EventLoopThread>> threads_;
  std::vector<EventLoop *> loops_;
};